home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 688 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: news.compuserve.com!newsmaster
  2. From: JamesCurran@CIS.CompuServe.com (James M. Curran)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Nested MACROS ??
  5. Date: Tue, 02 Apr 1996 20:58:24 GMT
  6. Organization: CompuServe Incorporated
  7. Message-ID: <4js4ev$ai1@dub-news-svc-2.compuserve.com>
  8. References: <4jgkno$mrr@aplinfo.jhuapl.edu> <4jhe6u$555@agate.berkeley.edu> <4jp3mi$bqc@aplinfo.jhuapl.edu>
  9. NNTP-Posting-Host: dd02-080.compuserve.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. In <<4jp3mi$bqc@aplinfo.jhuapl.edu>>, 
  13. Stan Novinsky <stan_novinsky@jhuapl.edu> wrote:
  14.  
  15. >Yes, I ses the problem.  I took care of it 
  16. >by changing to lower case x, however, I still 
  17. >don't understand why the call to the MACROS on 
  18. >an individual basis works...
  19. >EX :
  20. >  X = 4;
  21. >  cube_ans = CUBE(X);
  22.  
  23. >This returns the correct value (64) when I run the program...
  24. >Thanks for all the responses ...
  25.  
  26.     No it doesn't -- it won't even compile.  However, if you change the
  27. first line to "int x = 4;"  (note lower-case this time) then it will.
  28. CUBE() as it was written in your original post will cube the value
  29. stored in the varaible named (lowercase) "x".  The arguement to CUBE
  30. is ignored (since it doesn't appear in the macro definition)
  31.  
  32.  
  33.  
  34.  
  35.        Truth,
  36.        James
  37.  
  38.